import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/v1/user/login',
    method: 'post',
    data
  })
}

export function getInfo(data) {
  return request({
    url: '/v1/user/find/by/id',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/v1/user/update',
    method: 'post',
    data
  })
}

export function changePassword(data) {
  return request({
    url: '/v1/user/modify/passwd',
    method: 'post',
    data
  })
}

export function logout(data) {
  return request({
    url: '/v1/user/logout',
    method: 'post',
    data
  })
}
